<template>
  <div class="jx-content" id="player">
    <div v-if="form == 1">
      <player />
    </div>
    <div v-if="form == 2">
      <players />
    </div>
    <div style="text-align:center;padding:20px;" v-if="matchType == 3">
      暂无数据
    </div>
  </div>
</template>

<script>
import player from "./components/player.vue";
import players from "./components/players.vue";
export default {
  components: {
    player,
    players,
  },
  data() {
    return {
      courseId: "",
      form:'',
      matchType:'',
    };
  },
  created() {
    this.courseId = this.$localstorage.getLocalStorage('setCourseId');
    console.log(this.courseId,234777);
    this.init();
  },
  methods: {
    init() {
      this.getInfo();
    },

    //获取信息
    getInfo() {
      this.$http
        .get(`/tes/match/info/${this.courseId}`)
        .then((response) => {
          let res = response.data;
          if (res.code == "200") {
            console.log(res.data, 2223);
            this.form = res.data.form;
            this.matchType = res.data.matchType;
          } else {
            this.$message.error(res.message);
          }
        })
        .catch((err) => {
          console.log(err);
        });
    },
  },
};
</script>
<style lang="scss">
#player {
  .form-add {
    .el-input {
      width: auto;
      .el-input__count-inner {
        background: none;
      }
    }
  }
}
.filter-wraper {
  .input-wraper {
    margin-top: 20px;
    .el-input__inner {
      width: auto;
    }
  }
}
.el-tooltip__popper {
  max-width: 30%;
  line-height: 22px;
}
.chapter-info-table .el-switch__core {
  width: 28px;
  height: 16px;
}
.chapter-info-table .el-switch {
  margin-left: 15px;
}
.chapter-info-table .el-switch.is-checked .el-switch__core::after {
  margin-left: -13px;
}
.chapter-info-table .el-switch__core:after {
  width: 12px;
  height: 12px;
}
</style>
<style scoped>
.imgPost {
  vertical-align: inherit;
  position: absolute;
  right: 17px;
  color: rgb(2, 170, 255);
  font-size: 18px;
  padding-top: 5px;
}
.el-button--small:hover {
  color: #1277eb;
}
.el-tree >>> .el-tree-node {
  margin: 6px 0;
}
.el-form-item >>> .el-input__inner {
  width: 200px;
  height: 32px;
  border-radius: 4px;
}
.el-form >>> .el-textarea__inner {
  height: 200px;
  width: 350px;
  resize: none;
}
.el-form-item {
  margin-bottom: 22px;
}
.el-form-item >>> .el-form-item__content {
  height: auto;
}
.block::-webkit-scrollbar {
  width: 2px;
}
.block::-webkit-scrollbar-thumb {
  background: #dededd;
  border-radius: 50px;
}

.chapterTitle {
  width: 390px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: inline-block;
}
.custom-tree-node {
  padding-top: 10px;
}
</style>
<style lang="scss" scoped>
@import "./../../styles/ypublic.scss";

.downloadfile {
  color: #1277eb;
}
.jx-content {
  width: 1200px;
  margin: 20px auto;
  .courseName {
    font-size: 18px;
  }
  #topic-models {
    padding: 200px 0;
    .button-center {
      text-align: center;
      .button-style {
        text-align: center;
        height: 48px;
        line-height: 48px;
        border-radius: 48px;
        padding: 0 106px;
        margin: 10px;
      }
    }
  }
  .navBox {
    .reportTemplate {
      padding-bottom: 10px;
      margin-left: 190px;
      cursor: pointer;
    }
    .testTemplate {
      padding-bottom: 10px;
      margin-left: 40px;
      cursor: pointer;
    }
    .templateCheck {
      border-bottom: 2px solid $yBlue;
      color: $yBlue;
      cursor: pointer;
    }
  }
  .block {
    margin: 20px 0;
    overflow-y: scroll;
    height: 483px;
  }
  .saveBtn {
    text-align: center;
    margin-top: 10px;
  }
}
</style>
